//
//  WisdomLiveHTTPSessionManager.h
//  WisdomLive
//
//  Created by 葛 军 on 2018/5/11.
//  Copyright © 2018年 com.jszhaomi. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "AFNetworking.h"
FOUNDATION_EXTERN NSString *const kKeyMessage;
FOUNDATION_EXTERN NSString *const kHttpRequestFailure;
/**
 *  http返回状态码
 */
typedef enum DCHttpResult{
    DCHttpResultFailure = 0,
    DCHttpResultSuccess
} DCHttpResult;
typedef void (^completeBlock)(DCHttpResult result, NSString *errorMessage, id responseData);
typedef void (^completeDataBlock)(DCHttpResult result, NSString *errorMessage, NSData *responseData);

@interface WisdomLiveHTTPSessionManager : AFHTTPSessionManager

- (NSURLSessionDataTask *)POSTWithControllerName:(NSString *)controllerName
                                             url:(NSString *)url
                                      parameters:(id)parameters
                                        complete:(completeBlock)complete;



- (NSURLSessionDataTask *)GETWithControllerName:(NSString *)controllerName
                                            url:(NSString *)url
                                     parameters:(id)parameters
                                       complete:(completeBlock)complete;

- (NSURLSessionDataTask *)PUTWithControllerName:(NSString *)controllerName
                                            url:(NSString *)url
                                     parameters:(id)parameters
                                       complete:(completeBlock)complete;

- (NSURLSessionDataTask *)DeleteWithControllerName:(NSString *)controllerName
                                               url:(NSString *)url
                                        parameters:(id)parameters
                                          complete:(completeBlock)complete;

- (NSURLSessionDataTask *)DownloadWithString:(NSString *)urlStr parameters:(id)parameters complete:(completeBlock)complete;

@end
